#include <iostream>
#include <cassert>
#include <vector>
#include <algorithm>
#include <sstream>
#include <list>
#include <stack>
#include <queue>
using namespace std;

struct ListNode {
     int val;
     ListNode *next;
     ListNode() : val(0), next(nullptr) {}
     ListNode(int x) : val(x), next(nullptr) {}
     ListNode(int x, ListNode *next) : val(x), next(next) {}
};
//打印链表
void displayList(ListNode *p){
    while( p ){
        cout<< p->val ;
        p = p->next;
        if(p) cout<<"->";
    }
    cout<<endl;
}

//解决方案类
class Solution {
public:
    string mul1(string num1,char c){
        if(num1=="0" || c=='0')return "0";
        int n = num1.length();
        string rt="";
        int cin_s = 0,ans = 1;
        for(int i = n-1;i >= 0;--i) {
            ans = (num1.at(i) - '0') * (c - '0') + cin_s;
            cin_s = ans > 9 ? ans/10 : 0;
            ans = ans%10;
            rt = to_string(ans) + rt;
        }
        if(cin_s>0)  rt = to_string(cin_s) + rt;
        return rt;
    }
    //字符串加法
    string add(string num1 ,string num2) {
        int n1 = num1.length();
        int n2 = num2.length();
        int cin_s = 0 ,i=n1,j=n2;
        string rt="";
        while( (i>0 || j >0 )) {
            //cout<<i<<" "<< j <<endl;
            int a1 = i>0 ? num1.at(i-1) - '0' : 0;
            int a2 = j>0 ? num2.at(j-1) - '0' : 0;
            int sum = a1 + a2 + cin_s;
            cin_s = sum>9? sum/10 : 0;
            sum = sum > 9 ? sum % 10 : sum;
            rt = to_string(sum) + rt;
            i--;
            j--;
        }
        if(cin_s > 0) rt = to_string(cin_s) + rt;
        return rt;
    }
    //
    string mul10(string num) {
        return num == "0" ? "0" : num + "0";
    }
    string multiply(string num1, string num2) {
        string rt = "0";
        int n1 = num1.length();
        int n2 = num2.length();
        for( int i = 0;i<n2; ++i ) {
            rt = add( mul10(rt) , mul1(num1,num2.at(i))) ; 
        }
        return rt;
    }
};

int main(){
    Solution sp;
    string a = "234";
    string b = "113";
    cout<< sp.multiply(a,b)<<endl;
    return 0;
}